home *** CD-ROM | disk | FTP | other *** search
/ Software Explosion / Software Explosion (Fore-Matt Home Computing)(1996).iso / games / workbench / five_in_a_line / source / reqtools.c < prev    next >
C/C++ Source or Header  |  1994-04-23  |  2KB  |  83 lines

  1. #include <exec/exec.h>
  2. #include <proto/exec.h>
  3.  
  4. #include <intuition/intuition.h>
  5. #include <proto/intuition.h>
  6.  
  7. #include <libraries/reqtools.h>
  8. #include <proto/reqtools.h>
  9.  
  10. #include <libraries/gadtools.h>
  11. #include <proto/gadtools.h>
  12.  
  13. #include <stdio.h>
  14.  
  15. #include "fil.h"
  16.  
  17. extern struct Screen    *Scr;
  18. extern struct Window    *mwWnd;
  19. extern UWORD            offx;
  20. extern UWORD            offy;
  21. extern int                scoreboxheight;
  22. extern int                boardsize;
  23.  
  24. int openreqtools ( void )
  25. {
  26.     if ( ! ( ReqToolsBase = ( struct ReqToolsBase * ) OpenLibrary ( REQTOOLSNAME, 38 ) ) ) {
  27.         printf ( "reqtools.library V38 or higher not found\n" );
  28.         return ( 10 );
  29.     }
  30. }
  31.  
  32. void closereqtools ( void )
  33. {
  34.     if ( ReqToolsBase != NULL ) 
  35.         CloseLibrary ( ( struct Library * ) ReqToolsBase );    
  36. }
  37.  
  38. BOOL reqbegin ( void )
  39. {
  40.     BOOL startplayer;
  41.  
  42.     startplayer = rtEZRequestTags ( "Do you want to begin?", "Yes|No",
  43.         NULL, NULL,
  44.         RTEZ_ReqTitle, "FiveInLine 2.2",
  45.         TAG_END );
  46.  
  47.     return( startplayer );
  48. }
  49.  
  50. void showresult ( char * reqtext )
  51. {
  52.  
  53.     rtEZRequestTags ( reqtext , "Ok",
  54.         NULL, NULL,
  55.         RT_ReqPos, REQPOS_TOPLEFTWIN,
  56.         RT_LeftOffset, offx + 2 * INTERWIDTH + boardsize * BOXSIZE,
  57.         RT_TopOffset, offy + 2 * INTERHEIGHT + scoreboxheight + 50,
  58.         RT_Window, mwWnd,
  59.         RT_LockWindow, TRUE, 
  60.         RTEZ_ReqTitle, "Game over",
  61.         TAG_END );
  62. }
  63.  
  64. int showabout ( void )
  65. {
  66.  
  67.     rtEZRequestTags ( "Written by Njσl Fisketj°n using...\n\n"
  68.                     "SAS C++ 6.5\n"
  69.                     "(C) Copyright(1992) SAS Institute,Inc.\n\n"
  70.                     "GadToolsBoxV2.0b\n"
  71.                     "(C)Copyright 1991-93 Jaba Development\n\n"
  72.                     "reqtools.library\n(C) Copyright Nico Franτois\n",
  73.                     "OK", NULL, NULL,
  74.                     RTEZ_ReqTitle, "FiveInLine version 2.2 (1994)",
  75.                     RT_ReqPos, REQPOS_CENTERWIN,
  76.                     RTEZ_Flags, EZREQF_CENTERTEXT, 
  77.                     RT_Window, mwWnd, 
  78.                     RT_LockWindow, TRUE,
  79.                     TAG_END );
  80.  
  81.     return ( TRUE );
  82. }
  83.